{% extends "base.html"  %}
{% load static %}
{% block link  %}
<link rel="shortcut icon" href="{% static "favicon.ico" %}">
<link rel="stylesheet" href="{% static "css/common.css" %}">
<link rel="stylesheet" href="{% static "css/play.css" %}">
{% endblock %}

{% block body %}
<body>
	<div class="header">
		<a href="/" class="logo"><img src="{% static "image/logo.jpg" %}"></a>
		<div class="search-box">
			<!-- 歌曲搜索框 -->
            <form id="searchForm" action="{% url 'search' 1 %}" method="post">
            {% csrf_token %}
            <div class="search-keyword">
              <input id="kword" name="kword" type="text" class="keyword" maxlength="120">
            </div>
            <input id="subSerch" type="submit" class="search-button" value="搜 索" />
            </form>
            <div id="suggest" class="search-suggest"></div>
            <div class="search-hot-words">
                {% for s in searchs %}
                <a target="play" href="{% url 'play' s.document.id %}" >{{ s.document.name }}</a>
                {% endfor  %}
            </div>
		</div>
	</div><!--end header-->
	<div class="nav-box">
		<div class="nav-box-inner">
			<ul class="nav clearfix">
				<li><a href="{% url 'index' %}">首页</a></li>
				<li><a href="{% url 'ranking' %}" target="_blank">公文排行</a></li>
	    	    <li><a href="{% url 'home' 1 %}" target="_blank">用户中心</a></li>
                {% if user.username %}
                    <li><a href="{% url 'logout' %}" target="_blank">退出登录</a></li>
                    <h4>欢迎回来，{{ user.username }}</h4>
                {%  endif %}
			</ul>
		</div>
	</div><!--end nav-box-->
	<div class="wrapper clearfix">
        <div class="content">
            <div class="product-detail-box clearfix">
                <div class="product-pics">
                    <div class="music_box">
                        <div id="jquery_jplayer_1" class="jp-jplayer" data-url={{ documents.file.url }}></div>
                        <div class="jp_img layz_load pic_po" title="点击查看"><img data-src={{documents.img.url }}></div>
                        <div id="jp_container_1" class="jp-audio">
                            <div class="jp-gui jp-interface">
                                <div class="song_error_corr" id="songCorr">
                                    <b class="err_btn">纠错</b>
                                    <ul>
                                        <li><span>公文文本错误</span></li>
                                        <li><span>公文时间错误</span></li>
                                        <li><span>公文错误</span></li>
                                    </ul>
                                </div>
                                <ul class="jp-controls clearfix">
                                    <h3>公文摘要</h3>
                                </ul>
                            </div>
                        </div>
                        <div class="jplayer_content">
                            <ul id="lrc_list" class="lrc_list"></ul>
                        </div>
                    </div><!--end music_box-->
                    <textarea id="lrc_content" style="display: none;">
                      {{ lyrics }}
                    </textarea>
                </div><!--end product-pics-->
                <div class="product-detail-main">
                    <div class="product-price">
                        <h1 id="currentSong" >{{ documents.name }}</h1>
                        <div class="product-price-info">
                            <span>上传者：{{ documents.person }}</span>
                            <span>密钥：{{ str1_m }}</span>
                        </div>
                        <div class="product-price-info">
                            <span>分类：{{ documents.type }}</span>
                            <span>上传时间：{{ documents.time }}</span>
                        </div>
                        <div class="product-price-info">
                            <span>发文机关：{{ documents.office }}</span>
                            <span>SM3哈希值(后16)：{{ hash_16 }}</span>
                        </div>
                    </div><!--end product-price-->
                    <div class="product-comment">
                        <div class="links clearfix">
                            <a class="minimum-link-A click_down" href="{% url 'download' documents.id %}">下载</a>
                            <a class="minimum-link-A" href="{% url 'downloadr' documents.id %}">在线查看</a>
                            <a class="minimum-link-A" href="{% url 'comment' documents.id %}" >公文批复</a>
                        </div><!-- end links-->
                        <h3 class="list_title">当前观看列表</h3>
                        <ul class="playing-li" id="songlist">
                            <!--播放列表-->
                            {% for item in play_list %}
                            {%if item.id == documents.id %}
                            <li data-id="{{item.id}}" class="current">
                            {%else %}
                            <li data-id="{{item.id}}">
                            {%endif %}
                            <span class="num">{{forloop.counter}}</span>
                            <a class="name" href="{% url 'play' item.id %}" target="play" >{{item.name}}</a>
                            <a class="singer" href="javascript:;" target="_blank" >{{item.person}}</a>
                            </li>
                            {% endfor %}
                        </ul>
                        <div class="nplayL-btns" id="playleixin">
                        <ul>
                            <li class="next" data-run="next">
                                <a href="javascript:void(0)"><i></i>查看下一篇</a>
                            </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <div class="section">
                <div class="section-header">
                    <h3>相关公文</h3>
                </div>
                <div class="section-content">
                    <div class="parts-box">
                        <a href="javascript:;" target="_self" id="J_PartsPrev" class="prev-btn"><i></i></a>
                        <div class="parts-slider" id="J_PartsList">
                            <div class="parts-list-wrap f_w">
                                <ul id="" class="parts-list clearfix f_s">
                                    {% for item in relevant %}
                                    <li>
                                        {% if item.document.id != documents.id %}
                                        <a class="pic layz_load pic_po" href="{% url 'play' item.document.id %}" target="play" >
                                            <img data-src="{{ item.document.img.url }}">
                                        </a>
                                        <h4><a href="{% url 'play' item.document.id %}" target="play" >{{ item.document.name}}</a></h4>
                                        <a href="javascript:;" class="J_MoreParts accessories-more">{{ item.document.person }}</a>
                                        {% endif %}
                                    </li>
                                    {% endfor %}
                                </ul>
                            </div>
                        </div>
                        <a href="javascript:;" target="_self" id="J_PartsNext" class="next-btn"><i></i></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<script data-main="{% static "js/play.js" %}" src="{% static "js/require.js" %}"></script>
</body>
{% endblock  %}